<template>
    <section>
        <form action="javascript:;">
            <label for="title" >ToDoList</label>
            <input type="text" placeholder="添加TODO" value=""
              v-model="inputValue"
              @keydown.enter="todoInput"
            >
        </form>
    </section>
</template>

<script>
export default {
  data () {
    return {
      inputValue: ''
    }
  },
  methods: {
    todoInput () {
      // console.log(e.target.value)
      this.$emit('todoInputValue', { value: this.inputValue })
      this.inputValue = ''
    }
  }
}
</script>

<style scoped lang="scss">

</style>
